package com.kuang.lesson03.udp

import java.net.DatagramPacket
import java.net.DatagramSocket
import java.net.InetAddress

fun main() {
    val msg = "Hello,server.".toByteArray()
    val packet = DatagramPacket(msg, msg.size, InetAddress.getLocalHost(), 9999)
    DatagramSocket().use { it.send(packet) }
}